﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.AccSleep
{
    public class SleepApplyInfo
    {

        /// <summary>
        ///  申请休眠凭证号
        /// </summary>
        public string Accsqcardno { get; set; }

        /// <summary>
        ///  申请休眠凭证类型
        /// </summary>
        public short Accsqctype { get; set; }

        /// <summary>
        ///  休眠申请方式：1-余额异议 2-注销 3-卡丢失 4-临时冻结
        /// </summary>
        public short Accsqsleepway { get; set; }

        /// <summary>
        ///  申请休眠时间
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime Accsqoprtime { get; set; }

        /// <summary>
        ///  申请休眠机构id
        /// </summary>
        public int Accsqoprbrid { get; set; }

        /// <summary>
        ///  申请休眠机构名称
        /// </summary>
        public string Accsqoprbrname { get; set; }

        /// <summary>
        ///  申请休眠人id
        /// </summary>
        public int Accsqoprid { get; set; }

        /// <summary>
        ///  申请休眠人名称
        /// </summary>
        public string Accsqoprname { get; set; }

        /// <summary>
        ///  申请休眠操作记录流水号
        /// </summary>
        public string Accsqsleepoprsno { get; set; }

        /// <summary>
        ///  申请休眠时总余额：现金钱包（对da忽视）
        /// </summary>
        public decimal Accsqsleepxjye { get; set; }

        /// <summary>
        ///  申请休眠时总余额：增值钱包(不含红包)（对da忽视）
        /// </summary>
        public decimal Accsqsleepzzye { get; set; }

        /// <summary>
        ///  申请休眠时总余额：积分（可兑+不可兑）（对da忽视）
        /// </summary>
        public int Accsqsleepjfye { get; set; }

        /// <summary>
        ///  账户名称（对da忽视）（与修复entity共用）
        /// </summary>
        public string Accname { get; set; }


        /// <summary>
        ///  请求json（对da忽视）
        /// </summary>
        public string Oprjson { get; set; }

    }
    public class SleepApplyMapper : ClassMapper<SleepApplyInfo>
    {
        public SleepApplyMapper()
        {
            Table("#ApplyInfo");
            Map(f => f.Accsqcardno).Column("Accsqcardno");
            Map(f => f.Accsqctype).Column("Accsqctype");
            Map(f => f.Accsqsleepway).Column("Accsqsleepway");
            Map(f => f.Accsqoprtime).Column("Accsqoprtime");
            Map(f => f.Accsqoprbrid).Column("Accsqoprbrid");
            Map(f => f.Accsqoprbrname).Column("Accsqoprbrname");
            Map(f => f.Accsqoprid).Column("Accsqoprid");
            Map(f => f.Accsqoprname).Column("Accsqoprname");
            Map(f => f.Accsqsleepoprsno).Column("Accsqsleepoprsno");
            Map(f => f.Accsqsleepxjye).Column("Accsqsleepxjye");
            Map(f => f.Accsqsleepzzye).Column("Accsqsleepzzye");
            Map(f => f.Accsqsleepjfye).Column("Accsqsleepjfye");
            Map(f => f.Accname).Column("Accname");

        }

    }
}
